package com.wxy.demo.util;

/**
 * <p>
 *
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/5/26 10:11
 */
public record RedisKey(String format) {

    public static final RedisKey TOKEN;

    static {
        TOKEN = new RedisKey("app:token:%s");
    }

    public String formatKey(String key) {
        return String.format(this.format, key);
    }
}
